<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script lang="ts">

    function Person(name){
        this.name=name;
    }

    Person.prototype.SayHello= function(){
        console.log(`你好,我叫${this.name}`)
    }



    function child(name){
        Person.call(this,name)
    }

    

    child.prototype=new Person();

    let c1 = new child('texas');

    c1.SayHello();

   

    
</script>
</html>